<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN"> 
<head>
	
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<script type="text/javascript" src="js/jquery/jquery.js"></script>

<!-- INCLUDE meta.html -->
</head>
<body>
<div class='maindiv'>

<div class="headerdiv">
	<!-- INCLUDE header.html -->
</div>

<div id='content' style="margin:0px;padding:0px;">
	<div id='left'>
    	<div style="margin:10px;margin-top:30px;">
        	<ul>
				<!-- IF action="sort" -->
				<li><a href="admin.php?p=photo_album">{RETURN_TO_ALBUMS}</a></li>
				<!-- ELSE -->
            	<li><a href="javascript:new_album()">{NEW_ALBUM}</a></li>
				<!-- ENDIF -->
            </ul>
    		
        </div>
    </div>
    <div id='maindiv'>
    	<div class="description">
			{page_description}
        </div>

        <!-- IF err_msg -->
        <div class="err_msg pad">
        	{err_msg}
        </div>
        <!-- ENDIF -->
        
     
        <div class="real_content">
        	
        	<div id="new_album" style="display:<!-- IF album --><!-- ELSE -->none<!-- ENDIF -->;margin:20px;background-color:#FFFF99;width:400px;">
            	<h2>{NEW_ALBUM}</h2>
        		<form action="admin.php?m=new_album&p=photo_album" method="post">
        	<table cellpadding="0" cellspacing="5" border="0" style="width:400px;">
            	<tr>
                	<td>{ALBUM_NAME}</td>
                	<td><input type="text" class="inputtext" maxlength=200 name="name" value="{album.name}" />*</td>
               	</tr>

                <tr>
                	<td valign="top">{ALBUM_DESCRIPTION}</td>
                    <td><textarea name="description" rows="3" cols="30" class="inputtextarea" >{album.description}</textarea></td>
                </tr>
                <tr>
                	<td>&nbsp;</td>
                	<td align="center">
                    <input type="submit" value="{ALBUM_SUBMIT}" />
                    &nbsp;
                    <input type="button" onclick="cancel_new_album(); return false;" value="{CANCEL}" />
                    </td>
                </tr>
             </table>
             
                
           	</form>

            </div>
			<!-- IF action="sort" -->
				<!-- INCLUDE photo_album_sort.html -->
			<!-- ELSE -->
				<!-- INCLUDE photo_album_list.html -->
			<!-- ENDIF -->
			<br />
        </div>
        
    </div>
</div>

<script>
function delete_album(id,o)
{
	$(o).attr('to_be_delete','yes').html('{DELETING}').unbind('click');
	$.post('admin.php?p=ajax&m=delete&table=photo_album&id='+id,{ },delete_callback);
}
function delete_callback(s)
{
	if (s == 'error')
	{
		alert('{DELETE_ERROR}');
		return false;
	}
	$('[to_be_delete=yes]').parent().parent().fadeOut();
}
function new_album()
{
	$('#new_album').fadeTo(10,0).slideDown(200).fadeTo('fast',1);
}
function cancel_new_album()
{
	$('#new_album').fadeTo('fast',0).slideUp(200);
}

</script>
<!-- INCLUDE footer.html -->

</div>
</body>
</html>